package service.associate;

import relations.Associate;
import relations.belongsTo;
import dao.AlbumDAO;
import dao.AssociateDAO;
import dao.RecordDuplicateException;
import dao.belongsToDAO;
import entities.Customer;
import entities.User;
import entities.Album;
import entities.Order;



public class associateServiceInMemory implements associateService {

	public associateServiceInMemory(){
		
	}
	
	public static associateService newInstance(){
		return new associateServiceInMemory();
	}
	
	/**
	 * Finds a Album based on the Album id.
	 * @param userid - user id
	 * @return the instance of the Album
	 */
	public Associate findAssociate(Long product_id, String name){
		AssociateDAO db =  AssociateDAO.getInstance();
		Associate result = null;
		result = db.findAssociate(product_id, name);
		return result;
	}
	
	
	/**
	 * Adds a new Album to the system.
	 * @param obj - the Album instance to add
	 */
	
	public void addAssociate(User objUser, Order objOrder) throws RecordDuplicateException{
		belongsToDAO db = belongsToDAO.getInstance();	
		db.addbelongsTo(objUser, objOrder);
		return;
	}

	









}
